#include <stdio.h>
#include <unistd.h>

int main()
{
	if(access("a.txt",R_OK) == 0) printf("readable\n");
	if(access("a.txt",W_OK) == 0) printf("writable\n");
	if(access("a.txt",X_OK) == 0) printf("writable\n");
	if(access("a.txt",F_OK) == 0) printf("the file exists\n");	
}
